<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
<script>
    
    function 成绩()
    {
        var x=prompt("请输入你的成绩","");
        if (0<=x&&x<60)
        {
            y="不及格";
            return y;
        }
        if (60<=x&&x<70)
        {
            y="及格";
            return y;
        }
        if (x>=70&&x<80)
        {
            y="中等";
            return y;
        }
        if (x>=80&&x<90)
        {
            y="良好";
            return y;
        }
        if (x>=90&&x<=100)
        {
            y="优秀";
            return y;
        }
        
        if (0>x||x>100)
        {
            y="输入错误,请输入0到100间的数";
            return y;
        }
    }
    alert(成绩())
</script>


</body>
</html>